package thread;

public class CreateThreadBetter {
    static class Welcome implements Runnable {
        @Override
        public void run() {
            System.out.printf("2. I am %s%n",Thread.currentThread().getName());
        }
    }

    public static void main(String[] args) {
        Thread welcome = new Thread(new Welcome());
        welcome.start();
        System.out.printf("1. I am %s%n",Thread.currentThread().getName());
    }

}
